package com.daka.service.impl;

import com.daka.dao.GroupRecruitMapper;
import com.daka.entity.GroupRecruit;
import com.daka.service.GroupRecruitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * Created by yangx
 * Date: 2016/8/5 0005
 * Time: 14:33
 */
@Service("groupRecruitService")
@Transactional
public class GroupRecruitServiceImpl implements GroupRecruitService{

    @Autowired
    private GroupRecruitMapper groupRecruitMapper;

    public int insert(GroupRecruit groupRecruit){

        return groupRecruitMapper.insert(groupRecruit);
    }

    public int update(GroupRecruit groupRecruit){
        return groupRecruitMapper.updateByPrimaryKeySelective(groupRecruit);
    }

    public List<GroupRecruit> queryByEntity(Map map){
        return groupRecruitMapper.selectByStatement(map);
    }

    public GroupRecruit selectByPrimaryKey(Long id){
        return groupRecruitMapper.selectByPrimaryKey(id);
    }
}
